package cn.yangliu.springbatch.entity;

import lombok.EqualsAndHashCode;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;

/**
 * the type of springbatch
 *
 * <p>
 * .
 *
 * @author 杨柳
 * @date 2021-07-13
 */
@Entity
@Table(name = "batch_job_execution_context")
@EqualsAndHashCode
public class BatchJobExecutionContext {

    private Long jobExecutionId;
    private String shortContext;
    private String serializedContext;

    /**
     * instance member witch named jobExecutionId‘s getter
     * <p>
     * for get field witch named jobExecutionId’s value
     *
     * @return jobExecutionId
     */
    @Id
    @Column(name = "JOB_EXECUTION_ID", nullable = false)
    public Long getJobExecutionId() {
        return jobExecutionId;
    }

    /**
     * instance member witch named jobExecutionId's setter
     * for set field witch named jobExecutionId's value
     *
     * @param jobExecutionId jobExecutionId
     */
    public void setJobExecutionId(Long jobExecutionId) {
        this.jobExecutionId = jobExecutionId;

    }

    /**
     * instance member witch named shortContext‘s getter
     * <p>
     * for get field witch named shortContext’s value
     *
     * @return shortContext
     */
    @Basic
    @Column(name = "SHORT_CONTEXT", nullable = false, length = 2500)
    public String getShortContext() {
        return shortContext;
    }

    /**
     * instance member witch named shortContext's setter
     * for set field witch named shortContext's value
     *
     * @param shortContext shortContext
     */
    public void setShortContext(String shortContext) {
        this.shortContext = shortContext;

    }

    /**
     * instance member witch named serializedContext‘s getter
     * <p>
     * for get field witch named serializedContext’s value
     *
     * @return serializedContext
     */
    @Basic
    @Column(name = "SERIALIZED_CONTEXT")
    @Lob
    public String getSerializedContext() {
        return serializedContext;
    }

    /**
     * instance member witch named serializedContext's setter
     * for set field witch named serializedContext's value
     *
     * @param serializedContext serializedContext
     */
    public void setSerializedContext(String serializedContext) {
        this.serializedContext = serializedContext;
    }

}
